import request from "@/utils/request";

/**
 * @Auther: 唐十七
 * =====================字段============================
 */
export function getSettingQueryFields(query) {
  //获取需要查询的字段
  return request({
    url: "/zk/setting/query/fields/list",
    method: "get",
    params: query,
  });
}

export function addSettingQueryFields(data) {
  return request({
    url: "/zk/setting/query/fields/addSettingQueryFields",
    method: "post",
    data: data,
  });
}

export function editSettingQueryFields(data) {
  return request({
    url: "/zk/setting/query/fields/editSettingQueryFields",
    method: "post",
    data: data,
  });
}

export function getSettingQueryFieldsById(id) {
  return request({
    url: "/zk/setting/query/fields/getSettingQueryFieldsById/" + id,
    method: "get",
  });
}

export function deleteSettingQueryFields(id) {
  return request({
    url: "/zk/setting/query/fields/deleteSettingQueryFields/" + id,
    method: "delete",
  });
}

export function getIhrData(params){
  return request({
    url: "/zk/setting/query/fields/getIhrData",
    method: "get",
    params: params
  })
}

/**
 * @Auther: 唐十七
 * =====================表=============================
 */

export function getTableDefinition(query) {
  //获取分页列表  表标识
  return request({
    url: "/zk/setting/query/fields/tableDefinition/list",
    method: "get",
    params: query,
  });
}

export function addTableDefinition(data) {
  //新增表标识
  return request({
    url: "/zk/setting/query/fields/addTableDefinition",
    method: "post",
    data,
  });
}

export function editTableDefinition(data) {
  // 修改表标识
  return request({
    url: "/zk/setting/query/fields/editTableDefinition",
    method: "post",
    data,
  });
}

export function getTableDefinitionById(id) {
  return request({
    url: "/zk/setting/query/fields/getTableDefinitionById/" + id,
    method: "get",
  });
}

export function deleteTableDefinition(id) {
  // 删除表标识
  return request({
    url: "/zk/setting/query/fields/deleteTableDefinition/" + id,
    method: "delete",
  });
}
